Skip to content

feat: add agents/ YAML configs and top-level env field#47

Merged
robbycochran merged 8 commits into
mainfrom
rc/phase2-profile-migration
Jun 8, 2026
Merged

feat: add agents/ YAML configs and top-level env field#47
robbycochran merged 8 commits into
mainfrom
rc/phase2-profile-migration

Conversation

@robbycochran

Copy link
Copy Markdown
Collaborator

Summary

  • Adds agents/default.yaml and agents/ci.yaml (YAML equivalents of profiles/default.toml and ci.toml)
  • Adds top-level env field to AgentConfig for non-provider vars (inference proxy, Claude Code settings)
  • Provider config overrides top-level env when keys collide
  • 3 new tests for env merging and ParseFile roundtrip

Context

Stacked on #46. Part of Phase 2 profile migration. The profiles/ directory removal and code reference updates will come in a follow-up once the agent parser is wired into harness up/create.

Test plan

  • go test ./internal/agent/... passes (21 tests)
  • go test ./... passes (no regressions)

@robbycochran robbycochran changed the base branch from rc/phase2-agent-parser to main June 8, 2026 03:26
Phase 2 foundation: adds the agent config package that replaces profile.toml
with a declarative YAML format. The payload renderer generates self-contained
payload directories (env.sh, run.sh, bin/, task.md) uploaded to sandboxes.

New:
- internal/agent: AgentConfig struct, Parse/ParseFile, BuildEnvSh, BuildRunSh,
  RenderPayload with path traversal protection on include: paths
- go.work: Go workspace linking root module and sandbox/launcher module,
  enabling the launcher to import internal/ packages in follow-up PRs
- 18 tests covering parser validation, env generation, run.sh template,
  payload rendering, and security edge cases

Also:
- providers.toml: change gws type from custom to openshell (matches
  reality after GWS native provider in PR 44)
@robbycochran robbycochran force-pushed the rc/phase2-profile-migration branch from d43ec6c to 0217890 Compare June 8, 2026 03:27
Converts profiles/default.toml and profiles/ci.toml to the new agent.yaml
format under agents/. Adds a top-level env field to AgentConfig for non-
provider env vars (inference proxy config, Claude Code settings). Provider
config overrides top-level env when keys collide.

New files:
- agents/default.yaml: full agent config with all providers + proxy env
- agents/ci.yaml: minimal CI config with no providers

Changes:
- AgentConfig.Env field (map[string]string) merged into BuildEnvSh output
- 3 new tests: top-level env, provider override, ParseFile roundtrip
@robbycochran robbycochran force-pushed the rc/phase2-profile-migration branch from 0217890 to ddfeb60 Compare June 8, 2026 03:27
Adds test/kind-lifecycle.sh that manages the full kind cluster lifecycle:
create cluster, run tests, delete cluster. Uses an isolated temp kubeconfig
so it never touches your OCP/cloud kubectl context.

Simplifies validate-kind Makefile targets to use the lifecycle script.
Adds validate-kind-keep target for debugging (keeps cluster after tests).

Tested: 10/10 kind CI, OCP context undisturbed throughout.
Replaces 15+ overlapping Makefile test targets with a clear structure:

CI targets (no creds, GHA-safe):
  make ci             - unit + bats + lint
  make ci-local       - ci + local gateway integration
  make ci-kind        - ci + kind (self-contained cluster)

Developer targets (creds available):
  make dev-test-local - pre-commit: unit + bats + local full + ci
  make dev-test-kind  - kind with self-contained lifecycle
  make dev-test-remote - OCP: needs KUBECONFIG
  make dev-test-all   - all of the above

Updates integration.yml to use make ci-local and make ci-kind instead
of calling test-flow.sh directly. CI and local dev now use the same
entry points.

Tested: make ci passes, make dev-test-local passes (24/24 + 14/14).
make ci now includes bats tests, which requires bats on the runner.
The ubuntu-latest image doesn't have bats pre-installed.
Both clusters can't pull from private ghcr.io. Dev targets now build
dev images to quay.io first and pass SANDBOX_IMAGE/LAUNCHER_IMAGE
overrides to the test flows.
Kind clusters with cold image caches need extra time to pull the
supervisor init container. 60s was too tight -- bump to 120s.
On GHA, openshell is installed via deb package to /usr/bin/openshell.
The test restricts PATH to simulate a missing CLI, but can't exclude
/usr/bin without breaking everything else. Skip when openshell is at
a system path we can't exclude.
@robbycochran robbycochran merged commit 7f6738f into main Jun 8, 2026
4 checks passed
@robbycochran robbycochran deleted the rc/phase2-profile-migration branch June 13, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant